package com.qf.service.impl;

import com.qf.entity.ProductionWorkOrder;
import com.qf.dao.ProductionWorkOrderDao;
import com.qf.service.ProductionWorkOrderService;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
import java.util.Map;

/**
 * 生产工单表(ProductionWorkOrder)表服务实现类
 *
 * @author makejava
 * @since 2023-09-22 21:11:34
 */
@Service("productionWorkOrderService")
public class ProductionWorkOrderServiceImpl implements ProductionWorkOrderService {
    @Autowired
    private ProductionWorkOrderDao productionWorkOrderDao;
    /**
     * 分页查询
     *
     * @return 查询结果
     */
    @Override
    public List<ProductionWorkOrder> queryByPage(Map<String,String> map) {
        return this.productionWorkOrderDao.queryByPage(map);
    }
    /**
     * 新增数据
     *
     * @param productionWorkOrder 实例对象
     * @return 实例对象
     */
    @Override
    public int insert(ProductionWorkOrder productionWorkOrder) {
        return this.productionWorkOrderDao.insert(productionWorkOrder);
    }

    /**
     * 修改数据
     *
     * @param productionWorkOrder 实例对象
     * @return 实例对象
     */
    @Override
    public int update(ProductionWorkOrder productionWorkOrder) {
        return this.productionWorkOrderDao.update(productionWorkOrder);
    }

    /**
     * 通过主键删除数据
     *
     * @param workOrderNumber 主键
     * @return 是否成功
     */
    @Override
    public int deleteById(String workOrderNumber) {
        return this.productionWorkOrderDao.deleteById(workOrderNumber);
    }

    /**
     * 批量删除数据
     *
     * @param list workOrderNumber 集合
     * @return 删除是否成功
     */
    @Override
    public int batchDel(List<String> list) {
        return this.productionWorkOrderDao.batchDel(list);
    }

}
